﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
using System.Text;

using InfFront.UICore;

namespace InfFront.InfoSources.Base
{
    public partial class DummyInfoSource : InfoSource
    {
        public DummyInfoSource()
        {
            Init();
        }

        public DummyInfoSource(IContainer container)
        {
            container.Add(this);

            Init();
        }

        private void Init()
        {
            base.IsDummy = true;

            InitializeComponent();
        }

        [Browsable(false), DefaultValue(true)]
        public new bool IsDummy
        {
            get { return base.IsDummy; }
        }

        protected override int GetMaxEntryCount()
        {
            return 0;
        }

        protected override IInfoEntries GetEntries(int maxCount, EntryFilters filters, EntrySortDescriptions sorts)
        {
            throw new NotSupportedException();
        }

        protected internal override object UnwrapEntry(InfFront.UICore.IInfoEntry entry)
        {
            if (entry == null)
                return null;

            throw new NotSupportedException();
        }

        protected sealed override IInfoEntry CreateEmptyEntry()
        {
            throw new NotSupportedException();
        }
    }
}
